package com.hibernate;



/**
 * EncoursId entity. @author MyEclipse Persistence Tools
 */

public class EncoursId  implements java.io.Serializable {


    // Fields    

     private Carte carte;
     private Short typeencours;


    // Constructors

    /** default constructor */
    public EncoursId() {
    }

    
    /** full constructor */
    public EncoursId(Carte carte, Short typeencours) {
        this.carte = carte;
        this.typeencours = typeencours;
    }

   
    // Property accessors

    public Carte getCarte() {
        return this.carte;
    }
    
    public void setCarte(Carte carte) {
        this.carte = carte;
    }

    public Short getTypeencours() {
        return this.typeencours;
    }
    
    public void setTypeencours(Short typeencours) {
        this.typeencours = typeencours;
    }
   



   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof EncoursId) ) return false;
		 EncoursId castOther = ( EncoursId ) other; 
         
		 return ( (this.getCarte()==castOther.getCarte()) || ( this.getCarte()!=null && castOther.getCarte()!=null && this.getCarte().equals(castOther.getCarte()) ) )
 && ( (this.getTypeencours()==castOther.getTypeencours()) || ( this.getTypeencours()!=null && castOther.getTypeencours()!=null && this.getTypeencours().equals(castOther.getTypeencours()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getCarte() == null ? 0 : this.getCarte().hashCode() );
         result = 37 * result + ( getTypeencours() == null ? 0 : this.getTypeencours().hashCode() );
         return result;
   }   





}